Hello
I have this dxl, an horrible dxl, but the idea is that after I some selected requirements, these are copied to the module I wish, and if there are requirements with the same "Req tag", the oldest one would be deleted.
The problem is that the way the dxl is now, despite the print show me the right amount of requirements to be deleted, one requirement always remains after I run the dxl.
Another problem is that due to the way the delete conditions are made, the requirements cannot be created on the same date or both will be deleted, although procedurally it is not allowed, the simple fact of being a possibility is already a problem.
I thought about creating an attribute. ie "Copied" that would serve as a condition to the filter, but I stuck with this dxl progress, do you have any suggestions?
braolive - Wed Apr 30 17:31:15 EDT 2014 |
Re: Delete similar requirement I did not follow the entire thing. However: Function killduplicated():
Function killduplicated() is purging (hardDelete) objects inside the loop inside a filter. This messes up the loop and the filter. You should identify which objects you want to purge, then purge them:
The purge algorithm needs to be recursive; first purging the childless descendants. Change "hardDelete(oc)" with "DeleteObject(oc)". I dislike using Filters to find objects in DXL. It causes problems especially when you are mucking with the results of the Filter, such as purging objects. It CAN work and maybe it does; but it sure doesn't feel right. -Louie |